<?php

/* * * error reporting on ** */
error_reporting(E_ALL);
session_start();
/* * * define the site path ** */
$site_path = realpath(dirname(__FILE__));
define('__SITE_PATH', $site_path);
/**
 * import the file 
 */
require_once('inc/defaults.php');
require_once('inc/core.php');

/**
 * key word template ajax
 */
$ajax = array(
    "index" => ACT . "index",
    "search_list_air" => ACT . "search_list_air",
    "add_contact" => ACT . "add_contact",
    "add_order" => ACT . "add_order",
    "cart" => ACT . "cart",
    "add_feedback" => ACT . "add_feedback",
    "add_daily" => ACT . "add_daily",
    "add_dangky" => ACT . "add_dangky",
);

/**
 * import the file ajax
 */
require_once 'ajax/ajax.php';

$act = Core::getParam("act");
$param = Core::getParam();

if ($act == '' || $ajax[$act] == '') {
    $ajax[$act] = ACT . "index";
}

Ajax::$ajax[$act]($param);
?>
